package com.example.demo.service;

import com.example.demo.dao.UserMapper;
import com.example.demo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by hly on 2018\11\14 0014.
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public User findUserByName(String username){
        return userMapper.findUserByUsername(username);
    }

    public User saveUser(User user){
        return userMapper.save(user);
    }
}
